package com.aotain.nyx.abnormal;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import com.aotain.nyx.flink.BasicTuple;


public class AbnormalStatTuple extends BasicTuple {

	private Long upStreamOctets = 0l;
	private Long upStreamPacket = 0l;
	private String type ;
	private Long delayTime;	
	private Long pv = 1l;
	
	private HashMap<String,Double> dipPInfo = new HashMap<String,Double>();//各个目标Ip的熵值
	private HashMap<String,Long> dipPVMap = new HashMap<String,Long>();//目标IP PV数
	private Map<String,Long> tripleMap = new HashMap<String,Long>();//各个元组的PV
	private Map<String,Set<String>> dipToTriple = new HashMap<String,Set<String>>();//目标ip下的三元组映射
	private Map<String,Long> delaytimeMap = new HashMap<String,Long>();//求延时Map
	private Map<String,Long> maxDelayMap = new HashMap<String,Long>();//最大延时Map
	private Map<String,Long> minDelayMap = new HashMap<String,Long>();//最小延时Map
	private Map<String,Long> streamPacketMap = new HashMap<String,Long>();//
	private Map<String,Long> streamOctetsMap = new HashMap<String,Long>();//
	private Map<String,Integer> delayTimePVMap = new HashMap<String,Integer>();//
	private HashMap<String,Long> sdPVMap = new HashMap<String,Long>();//各个源ip到目标ip的PV数
	//源IP异常用
	private HashMap<String,Long> sipPVMap = new HashMap<String,Long>();//SIP PV数
	private Map<String,Set<String>> sipToTriple = new HashMap<String,Set<String>>();//sip下的三元组映射
	
	//	private Set<String> IPSet = new HashSet<String>();//要过滤的ip

	
	public Long getPv() {
		return pv;
	}
	public void setPv(Long pv) {
		this.pv = pv;
	}
	public Long getUpStreamOctets() {
		return upStreamOctets;
	}
	public void setUpStreamOctets(Long upStreamOctets) {
		this.upStreamOctets = upStreamOctets;
	}
	public Long getUpStreamPacket() {
		return upStreamPacket;
	}
	public void setUpStreamPacket(Long upStreamPacket) {
		this.upStreamPacket = upStreamPacket;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public Long getDelayTime() {
		return delayTime;
	}
	public void setDelayTime(Long delayTime) {
		this.delayTime = delayTime;
	}
	public HashMap<String, Double> getDipPInfo() {
		return dipPInfo;
	}
	public void setDipPInfo(HashMap<String, Double> dipPInfo) {
		this.dipPInfo = dipPInfo;
	}
	public HashMap<String, Long> getSdPVMap() {
		return sdPVMap;
	}
	public void setSdPVMap(HashMap<String, Long> sdPVMap) {
		this.sdPVMap = sdPVMap;
	}
	public Map<String, Long> getTripleMap() {
		return tripleMap;
	}
	public void setTripleMap(Map<String, Long> tripleMap) {
		this.tripleMap = tripleMap;
	}
	public Map<String, Set<String>> getDipToTriple() {
		return dipToTriple;
	}
	public void setDipToTriple(Map<String, Set<String>> dipToTriple) {
		this.dipToTriple = dipToTriple;
	}
	public Map<String, Long> getDelaytimeMap() {
		return delaytimeMap;
	}
	public void setDelaytimeMap(Map<String, Long> delaytimeMap) {
		this.delaytimeMap = delaytimeMap;
	}
	public Map<String, Long> getMaxDelayMap() {
		return maxDelayMap;
	}
	public void setMaxDelayMap(Map<String, Long> maxDelayMap) {
		this.maxDelayMap = maxDelayMap;
	}
	public Map<String, Long> getMinDelayMap() {
		return minDelayMap;
	}
	public void setMinDelayMap(Map<String, Long> minDelayMap) {
		this.minDelayMap = minDelayMap;
	}
	public Map<String, Long> getStreamPacketMap() {
		return streamPacketMap;
	}
	public void setStreamPacketMap(Map<String, Long> streamPacketMap) {
		this.streamPacketMap = streamPacketMap;
	}
	public HashMap<String, Long> getDipPVMap() {
		return dipPVMap;
	}
	public void setDipPVMap(HashMap<String, Long> dipPVMap) {
		this.dipPVMap = dipPVMap;
	}
	public Map<String, Long> getStreamOctetsMap() {
		return streamOctetsMap;
	}
	public void setStreamOctetsMap(Map<String, Long> streamOctetsMap) {
		this.streamOctetsMap = streamOctetsMap;
	}
	public Map<String, Integer> getDelayTimePVMap() {
		return delayTimePVMap;
	}
	public void setDelayTimePVMap(Map<String, Integer> delayTimePVMap) {
		this.delayTimePVMap = delayTimePVMap;
	}
	public HashMap<String, Long> getSipPVMap() {
		return sipPVMap;
	}
	public void setSipPVMap(HashMap<String, Long> sipPVMap) {
		this.sipPVMap = sipPVMap;
	}
	public Map<String, Set<String>> getSipToTriple() {
		return sipToTriple;
	}
	public void setSipToTriple(Map<String, Set<String>> sipToTriple) {
		this.sipToTriple = sipToTriple;
	}
	@Override
	public String toString() {
		return "AbnormalStatTuple [upStreamOctets=" + upStreamOctets
				+ ", upStreamPacket=" + upStreamPacket + ", type=" + type
				+ ", delayTime=" + delayTime + ", pv=" + pv + ", dipPInfo="
				+ dipPInfo + ", dipPVMap=" + dipPVMap + ", tripleMap="
				+ tripleMap + ", dipToTriple=" + dipToTriple
				+ ", delaytimeMap=" + delaytimeMap + ", maxDelayMap="
				+ maxDelayMap + ", minDelayMap=" + minDelayMap
				+ ", streamPacketMap=" + streamPacketMap + ", streamOctetsMap="
				+ streamOctetsMap + ", delayTimePVMap=" + delayTimePVMap
				+ ", sdPVMap=" + sdPVMap + ", sipPVMap=" + sipPVMap
				+ ", sipToTriple=" + sipToTriple + ", getDestIP()="
				+ getDestIP() + ", getSourceIP()=" + getSourceIP()
				+ ", getDestPort()=" + getDestPort() + ", getSourcePort()="
				+ getSourcePort() + ", getGIS()=" + getGIS() + ", getIDC()="
				+ getIDC() + ", getSessionNum()=" + getSessionNum()
				+ ", getAttackPacket()=" + getAttackPacket()
				+ ", getFlowDirection()=" + getFlowDirection() + "]";
	}
	
	
}
